let dev = require('../../script/test/index');
let app;
beforeAll(async done => {
  app = await dev.start();
  done();
}, 10000);
afterAll(async done => {
  if (app && app.isRunning()) {
    await app.stop();
  }
  done();
}, 10000);
test('验证窗口数量', async function () {
  let windowCount = await app.client.getWindowCount();
  expect(windowCount).toBe(1);
});
// test("验证窗口标题", async function () {
//   let title = await app.client.getTitle();
//   expect(title).toBe("Vite App");
// });
// test("点击按钮并确认结果", async function () {
//   let btn = await app.client.$("button");
//   await btn.click();
//   await btn.click();
//   let text = await btn.getText();
//   console.log(text)
//   expect(text).toBe("count is: 2");
// });
